﻿

class game.Actor {

	static private var _count:Number = 0;
	static function get nextId():String{return "actor"+_count++;}

	
	private var _inLoopArray:Boolean;
	function set inLoopArray(val:Boolean){_inLoopArray = val;}
	function get inLoopArray():Boolean{return _inLoopArray;}

	
	private var _behavior:Function;
	
	private var _state:Number;
	function get state():Number{return _state;}

	//function get Viewport():GameViewport{return GameViewport.Instance;}

	//function get World():GameWorld{return GameWorld.Instance;}

	// CONSTRUCTOR
	function Actor(){
	}

	function reset(){} // virtual

	function die(){}

	function remove(){
		//Session.RemoveFromLoopArray(this);
		onRemoved();
	}

	function onRemoved(){}

	function update(){}// virtual

}
